Developer --> Technical Publications
PATHJava Developer Documentation > Mac OS Runtime for Java > JManager > Programming With JManager


Getting Information About AWT Contexts and Frames

JManager provides a number of functions that return information about an AWT context or a frame. For example, since multiple applets can appear onscreen, if a user clicks in a window that corresponds to a frame, you may need to find out what applet or AWT context the frame belongs to.

The JMCountAWTContextFrames function JMCountAWTContextFrames counts the number of frames associated with an AWT context.

The JMGetAWTContextFrame function JMGetAWTContextFrame lets you find a particular frame (as indexed by the JMCountAWTContextFrames function) associated with an AWT context.

The JMGetFrameContext function JMGetFrameContext finds the AWT context associated with a frame.

The JMGetFrameViewer function JMGetFrameViewer lets you determine the frame associated with an applet.

The JMGetViewerFrame function JMGetViewerFrame finds an applet's parent frame, which is the frame created when the applet is created.

If you want to set or read client-specific data associated with an AWT context, you can do so using the functions JMSetAWTContextData and JMGetAWTContextData.

If you want to read or set client-specific data associated with a particular frame, you can do so using the functions JMGetFrameData and JMSetFrameData. You can store the window record as client data to make it easy to find a window corresponding to a frame. See Listing 1-8 and Listing 1-9 for an example.


© 1998 Apple Computer, Inc. — (Last Updated 3 Dec 98)

Previous | Back Up One Level | Next |